cmake_minimum_required(VERSION 3.14)

project(Docs)

# ---- Doxygen variables ----

# 复制配置文件
configure_file(${CMAKE_CURRENT_LIST_DIR}/Doxyfile
               ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

add_custom_target(
  GenerateDocs
  COMMAND "cd" "${CMAKE_SOURCE_DIR}/src"
  COMMAND "doxygen" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
  COMMAND echo "Docs written to: ${DOXYGEN_OUTPUT_DIRECTORY}"
  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
